<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>基础表单</title>
    <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>
    <link rel="stylesheet" href="../../../assets/module/admin.css?v=311"/>
    <style>
        .layui-form-item {
            margin-bottom: 25px;
        }
    </style>
</head>

<body>

<!-- 加载动画，移除位置在common.js中 -->
<div class="page-loading">
    <div class="ball-loader">
        <span></span><span></span><span></span><span></span>
    </div>
</div>

<!-- 正文开始 -->
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">

            <form class="layui-form" style="max-width: 700px;margin: 40px auto;">
                <div class="layui-form-item">
                    <label class="layui-form-label">标题:</label>
                    <div class="layui-input-block">
                        <input type="text" name="title" placeholder="给目标起个名字" class="layui-input"
                               lay-verify="required" required/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">起止日期:</label>
                    <div class="layui-input-block">
                        <input id="dateRange01" type="text" name="time" placeholder="请选择开始和结束日期"
                               class="layui-input date-icon" lay-verify="required" required/>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">目标描述:</label>
                    <div class="layui-input-block">
                        <textarea name="desc" placeholder="请输入你的阶段性工作目标" class="layui-textarea"></textarea>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">衡量标准:</label>
                    <div class="layui-input-block">
                        <textarea name="hlbz" placeholder="请输入衡量标准" class="layui-textarea"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">客户:</label>
                    <div class="layui-input-block">
                        <input type="text" name="customer" placeholder="请描述你服务的客户" class="layui-input"
                               lay-verify="required" required/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">邀评人:</label>
                    <div class="layui-input-block">
                        <input type="text" name="person" placeholder="最多可邀请5人" class="layui-input"
                               lay-verify="required" required/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">权重:</label>
                    <div class="layui-input-inline">
                        <input type="number" name="qz" placeholder="请输入" class="layui-input"
                               lay-verify="required" required/>
                    </div>
                    <div class="layui-form-mid layui-word-aux">%</div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">目标公开:</label>
                    <div class="layui-input-block">
                        <input type="radio" name="gk" value="0" title="公开" checked>
                        <input type="radio" name="gk" value="1" title="部分公开">
                        <input type="radio" name="gk" value="2" title="不公开">
                    </div>
                    <div class="layui-form-mid layui-word-aux">客户、邀评人默认被分享</div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-filter="formDemo" lay-submit>&emsp;提交&emsp;</button>
                        <button type="reset" class="layui-btn layui-btn-primary">&emsp;重置&emsp;</button>
                    </div>
                </div>
            </form>

        </div>
    </div>
</div>

<!-- js部分 -->
<script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
<script type="text/javascript" src="../../../assets/js/common.js?v=311"></script>

<script>
    layui.use(['layer', 'form', 'laydate'], function () {
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        var laydate = layui.laydate;

        // 渲染laydate
        laydate.render({
            elem: '#dateRange01',
            range: true
        });

        // 监听表单提交
        form.on('submit(formDemo)', function (data) {
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
</script>
</body>

</html>